Remove Method

Wintellect PowerCollections

Collapse imageExpand ImageCollapseAll imageExpandAll imageDropDown imageDropDownHover imageCopy imageCopyHover image
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Searches the list for the first item that compares equal to item. If one is found, it is removed. Otherwise, the list is unchanged.

Namespace: Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax

C#
public override bool Remove(
	T item
)
Visual Basic (Declaration)
Public Overrides Function Remove ( _
	item As T _
) As Boolean
Visual C++
public:
virtual bool Remove (
	T item
) override

Parameters

item
T
The item to remove from the list.

Return Value

True if an item was found and removed that compared equal to item. False if no such item was in the list.

Remarks

Equality in the list is determined by the default sense of equality for T. If T implements IComparable<T>, the Equals method of that interface is used to determine equality. Otherwise, Object.Equals is used to determine equality.

See Also